package io.qar.categories.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;
import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;

import io.qar.commons.mybatis.entity.ZyBaseEntity;

/**
 * 分类信息表
 *
 * @author yyyyjinying 1020066395@qq.com
 * @since 3.0 2024-06-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("zy_categories")
public class CategoriesEntity extends ZyBaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 分类ID
     */
    @TableId
    private Long categoryId;
    /**
     * 父分类ID
     */
    private Long parentId;
    /**
     * 餐厅ID
     */
    private Long restaurantId;
    /**
     * 分类名称
     */
    private String name;
    /**
     * 分类描述
     */
    private String description;
    /**
     * 是否启用：1-启用，0-禁用
     */
    private Integer isActive;
    /**
     * 分类图片URL
     */
    private String imageUrl;
    /**
     * 排序字段，默认值为0
     */
    private Integer sortOrder;

    @TableField(exist = false)
    private String parentName;

    @TableField(exist = false)
    private String restaurantName;
}